package www.wpz.com.medical.ui;

import javax.swing.*;
import java.awt.*;

/**
 * Created by wangpengzhi1 on 2019/1/10.
 */
public class ImagePanel  extends JPanel {
    private String path;
    public ImagePanel(String path){
        this.path = path;
    }

    public ImagePanel(){}

    public void paint(Graphics g) {
        super.paint(g);
        ImageIcon icon = new ImageIcon(path);
        g.drawImage(icon.getImage(), 0, 0, 400, 300, this);
    }
}
